package cn.wit.test;

import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class DemoAccess extends HttpServlet{
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

		//读取用户上次的访问时间
		Cookie[] cookie = req.getCookies();
		
		if(cookie != null) {
			
			for(Cookie c:cookie) {
				System.out.println(c);
			}
		}
		
	}

}
